Class Property 

The Class property returns the object class of the object. Read-only.

Syntax

object.Class

Data Type

Long

Remarks

The Class property contains a numeric constant that identifies the OLE Messaging Library object. The following values are defined:

OLE Messaging Library object

Class ID value

Value

AddressEntries collection

21

mapiAddressEntries

AddressEntry

8

mapiAddressEntry

AddressEntryFilter

9

mapiAddressFilter

AddressList

7

mapiAddressList

AddressLists collection

20

mapiAddressLists

Attachment

5

mapiAttachment

Attachments collection

18

mapiAttachments

Field

6

mapiField

Fields collection

19

mapiFields

Folder

2

mapiFolder

Folders collection

15

mapiFolders

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

InfoStore

1

mapiInfoStore

InfoStores collection

14

mapiInfoStores

Message

3

mapiMsg

MessageFilter

10

mapiMessageFilter

Messages collection

16

mapiMessages

Recipient

4

mapiRecipient

Recipients collection

17

mapiRecipients

Session

0

mapiSession

 

Example

' Function: Util_DecodeObjectClass

' Purpose: Decode the long integer class value,

'          show the related object name

' See documentation topic: Class property

Function Util_DecodeObjectClass(lClass As Long)

    ' error handling here...

    Select Case (lClass)

        Case mapiSession:

            MsgBox ("Session object; class = " & lClass)

        Case mapiMsg:

            MsgBox ("Message object; class = " & lClass)

    End Select

    ' error handling

End Function

 

' Function: TestDrv_Util_DecodeObjectClass

' Purpose: Call the utility function DecodeObjectClass for Class values

' See documentation topic: Class property

Function TestDrv_Util_DecodeObjectClass()

    ' error handling here...

    If objSession Is Nothing Then

        MsgBox "Need to set the Session object: Session->Logon"

        Exit Function

    End If

    ' expect type mapiSession = 0 for Session object

    Util_DecodeObjectClass (objSession.Class)

    Set objMessages = objSession.Inbox.Messages

    Set objOneMsg = objSession.Inbox.Messages.GetFirst

    If objOneMsg Is Nothing Then  ' empty inbox

        Exit Function

    End If

    ' expect type mapiMessage = 3 for Message object

    Util_DecodeObjectClass (objOneMsg.Class)

    ' error handling here...

End Function

 

See Also

All OLE Messaging Library Objects2WDT9K4